<?php

use yii\db\Migration;

/**
 * Handles the creation of table `package_initiation_plan`.
 */
class m171026_080448_create_package_initiation_plan_table extends Migration
{
    /**
     * @inheritdoc
     * 资产包立项工作计划表
     */
    public function up()
    {
        $this->createTable('package_initiation_plan', [
            'id' => $this->bigPrimaryKey(),
            'package_id' => $this->bigInteger()->notNull(),
            'stage' => $this->string()->notNull()->comment('阶段'),
            'job' => $this->text()->comment('结点'),
            'created_at' => $this->timestamp(),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('package_initiation_plan');
    }
}
